home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / nrpas13.zip / BESSK1.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-29  |  526b  |  17 lines

  1. FUNCTION bessk1(x: real): real;
  2. VAR
  3.    y,ans: double;
  4. BEGIN
  5.    IF  (x <= 2.0)  THEN BEGIN
  6.       y := x*x/4.0;
  7.       ans := (ln(x/2.0)*bessi1(x))+(1.0/x)*(1.0+y*(0.15443144
  8.          +y*(-0.67278579+y*(-0.18156897+y*(-0.1919402e-1
  9.          +y*(-0.110404e-2+y*(-0.4686e-4)))))))  END
  10.    ELSE BEGIN
  11.       y := 2.0/x;
  12.       ans := (exp(-x)/sqrt(x))*(1.25331414+y*(0.23498619
  13.          +y*(-0.3655620e-1+y*(0.1504268e-1+y*(-0.780353e-2
  14.          +y*(0.325614e-2+y*(-0.68245e-3)))))))  END;
  15.    bessk1 := sngl(ans)
  16. END;
  17.